package com.mallcloud.mall.mall.api.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.util.Optional;

@ApiModel(value="ProXglQRCodePaymentCouponReversal",description="手工券核销冲正过程对象")
@Data
@ToString
public class ProXglQRCodePaymentCouponReversal {

	@ApiModelProperty("券序号")
	private String couponId;
	@ApiModelProperty("券金额")
	private String redeemMoney;
	@ApiModelProperty("核销门店")
	private String writeOffStoreNo;

	@ApiModelProperty(value = "过程返回id", hidden = true)
	private Integer messageId;
	@ApiModelProperty(value = "过程返回信息", hidden = true)
	private String message;

	public boolean isSuccess() {
		return Optional.ofNullable(this.messageId).map(x -> x.equals(0)).orElse(false);
	}
}
